<div class="view">
<table>
	<tr>
	<td width=30%>
		<?php 
			$sql = "select title from creatives where id=$data->content_id"; 
			$command = Yii::app()->db->createCommand($sql);   
			$data3=$command->queryAll();
			
			echo $data3[0]['title']; 
		?>
	</td>
	<td>
		<?php
			//sql to get the max value
			$sql = "SELECT MAX(value) FROM content_points;"; 
			$command = Yii::app()->db->createCommand($sql);   
			$data2=$command->queryAll();	
			$max=$data2[0]['MAX(value)'];
			
			$value = $data->value;
			//calc
			$value2 = ($value/$max)*100;
			
			
			$this->widget('bootstrap.widgets.TbProgress', array(
			'type'=>'info', // 'info', 'success' or 'danger'
			'percent'=>$value2, // the progress
			'striped'=>true,
			));
		?>
	</td>
	<td width=10%>
		<?php
		echo $value;
		?>
	</td>
	</tr>
</table>
</div>